<html xmlns:xf="http://www.w3.org/2002/xforms">
   <head>
	<!-- do not include a <meta> tag -->
      <link rel="stylesheet" type="text/css" href="/pentaho-style/active/default.css"></link>
      <title>Choose Chart</title>
            			
				<script src="../../../js/parameters.js" type="text/javascript"></script>
						
      			<script><![CDATA[
       			  var url= window.location.pathname;
      			  var target=unescape('theoutput');
      			  function doForm() {
      			    var submitUrl = url + '?';
      			    var form = document.forms['parameter-form'];
      			    var elements = form.elements;
      			    var i;
      			    for( i=0; i<elements.length; i++ ) {
      			      if( elements[i].type == 'select-one' || elements[i].type == 'text' || elements[i].type == 'hidden') {
      			        if ( elements[i].name == 'path') {
      			        		submitUrl += '&' + elements[ i ].name + '=' + encodeURIComponent( elements[ i ].value );
      			        	} else {
      			        		submitUrl += '&' + elements[ i ].name + '=' + escape( elements[ i ].value );
      			        	}
      			      } else if( elements[i].type == 'radio' ) {
      			      	if( elements[i].checked ) {
      			          submitUrl += '&' + elements[ i ].name + '=' + escape( elements[ i ].value );
      			      	}
      			      } else if( elements[i].type == 'checkbox' ) {
      			      	if( elements[i].checked ) {
      				      submitUrl += '&' + elements[i].name + "=" + escape( elements[i].value );
      			      	}
      			      } else if( elements[i].type == 'select-multiple' ) {
      				    var options = elements[i].options;
      				    var j;
      				    for( j=0; j!=options.length; j++ ) {
      				      if( options[j].selected ) {
      	  			        submitUrl += '&' + elements[i].name + '=' + escape( options[ j ].value );
      				      }
      				    }
      				  }
      			    }
      			    if( target == '' ) {
      				    document.location.href=submitUrl;
      				} else {
      					window.open( submitUrl, target );
      				}
      			    return false;
      			  }
      			]]></script>
      		
	{xform-header}

   </head>
   <body>
      <div style="margin:10px;border:1px solid #808080;padding:5px;">
         <form name="parameter-form" id="parameter-form" method="GET">
            <table border="0" width="100%" class="parameter_table" cellpadding="0" cellspacing="0">
               <tr>
                  <td>Chart Examples</td>
               </tr>
               <tr>
                  <td class="portlet-font">Select a Chart Type: {chart_type}  <input type="button" name="go" class="portlet-form-button" value="Run..." onClick="doForm()"/></td>
                  </tr>
            </table>
		{path}
	    </form>
      </div>    
   <div>
   <iframe width="800" height="700" name="theoutput" frameborder="0" scrolling="no"></iframe>
   </div>
   </body>
     
</html>